﻿using Nb.Common.Domains.Models;

namespace Nb.Tenants.Libs.Domains.Models
{
    /// <summary>
    /// 强类型的Id值对象
    /// </summary>
    public class TenantId : NbEntityId
    {
        public TenantId()
            : base()
        {
        }

        public TenantId(string id)
            : base(id)
        {
        }
    }
    public abstract class MultiTenantNbEntity<T> : NbEntity<T> where T : MultiTenantNbEntity<T>
    {
        public virtual TenantId TenantId { get; set; }
    }

    public class Role : MultiTenantNbEntity<Role>
    {
        public virtual string Name { get; set; }
    }

    public class User : NbEntity<User>
    {
        public virtual TenantId TenantId { get; set; }
        public virtual string LoginName { get; set; }
    }
}